<% 8.times do %>
<div class="col-lg-6">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>输出选项定制 <small>Example of login in modal box</small></h5>
            <div class="ibox-tools">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
            </div>
        </div>
        <div class="ibox-content">
            <table class="table table-hover">
                <thead>
                <tr>
                  <th>数据分组</th>
                  <th>定制显示</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                  <td>A组</td>
                  <td class="text-navy"><input type="checkbox" class="js-switch" checked /></td>
                </tr>
                <tr>
                  <td>B组</td>
                  <td class="text-warning"><input type="checkbox" class="js-switch"/></td>
                </tr>
                <tr>
                  <td>C组</td>
                  <td class="text-navy"><input type="checkbox" class="js-switch" checked /></td>
                </tr>
                <tr>
                  <td>D组</td>
                  <td class="text-navy"><input type="checkbox" class="js-switch" checked /></td>
                </tr>
                </tbody>
            </table>
            <div class="text-center">
            <a data-toggle="modal" class="btn btn-primary" href="#modal-form">编辑</a>
            </div>
            <div id="modal-form" class="modal fade" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                            <h3 class="text-center">显示状态编辑</h3>
                        <div class="modal-body">
                            <div class="row">
                                <div class="col-sm-12">
                                    <form role="form">
                                        <table class="table table-hover">
                                            <thead>
                                            <tr>
                                                <th>数据分组</th>
                                                <th>定制显示</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr class="form-group">
                                                <td>A组</td>
                                                <td class="text-navy"><input type="checkbox" class="js-switch1" checked /></td>
                                            </tr>
                                            <tr class="form-group">
                                                <td>B组</td>
                                                <td class="text-warning"><input type="checkbox" class="js-switch1"/></td>
                                            </tr>
                                            <tr class="form-group">
                                                <td>C组</td>
                                                <td class="text-navy"><input type="checkbox" class="js-switch1" checked /></td>
                                            </tr>
                                            <tr class="form-group">
                                                <td>D组</td>
                                                <td class="text-navy"><input type="checkbox" class="js-switch1" checked /></td>
                                            </tr>
                                            </tbody>
                                        </table>
                                        <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>提交</strong></button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<% end %>
<script type="text/javascript">
    $(document).ready(function(){
        var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
        elems.forEach(function(html) {
            var switchery = new Switchery(html, { color: '#1AB394', disabled: 'true' });
        });
        var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch1'));
        elems.forEach(function(html) {
            var switchery_1 = new Switchery(html, { color: '#1AB394'});
        });
    });
</script>
